package com.example.rabbitmqprovider;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration  //配置类
/**
 * @Description: 自己配置的MQ的配置类，可以实现对象直接转为Json 而不是乱码序列化
 * @Param:
 * @return:
 * @Author: 葛春光
 * @Date: 2020/7/23
 */
public class MyRabbitMQConfig {
    @Bean
    public Jackson2JsonMessageConverter messageConverter() {
        return new Jackson2JsonMessageConverter();
    }
}